package com.ly.web.admin.controller.demo;

import com.ly.common.models.common.RequestMessage;
import com.ly.common.models.common.ResponseMessage;
import com.ly.web.admin.service.demo.domain.DemoDomain;
import com.ly.web.admin.service.demo.query.DemoQuery;
import com.ly.web.admin.service.demo.service.IDemoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * demo控制层
 * @Auther: lzw
 * @Date: 2018/6/5
 */
@Controller
@RequestMapping("/demo")
public class DemoController {

    @Autowired
    private IDemoService demoService;

    @RequestMapping("demo")
    @ResponseBody
    public ResponseMessage findPage(DemoQuery<DemoDomain> query) {
        RequestMessage.vaildBeanStatic(query);
        return ResponseMessage.success(demoService.selectTest());  //demoService.findPage(query);
    }

}
